<template>
  <div class="container">
    <div class="cont-bg">
      <img src="@/assets/bg_pirse.png" alt class="bg" />
    </div>
    <div class="scroll-info">
      <div class="info" v-for="(temp,index) in 10" :key="index">
        <div class="time">2019.10.9</div>
        <div class="bg_ticket">
          <img src="@/assets/un_use.png" alt class="use-bg" />
          <div class="cont">
            <div class="rank">一等奖</div>
            <div>
              <div class="name">海底捞200元代金券</div>
              <div class="id">NO.15678994511</div>
            </div>
            <div class="btn" @click="show = true"></div>
          </div>
        </div>
        <div class="rule">
          <div>·请勿自己点击[使用]，否则奖券作废；</div>
          <div>·消费满300元可用一张；</div>
          <div>·有效期：即日起-2019年11月1日,周六周日不可用；</div>
          <div>·营业时间：11:00-24:00；</div>
          <div>·店铺地址：高陵区红星路233号</div>
        </div>
      </div>
    </div>
    <!-- <van-overlay :show="show" @click="show = false" /> -->
    <div class="fix" v-show="show" @click="show = false" >
            <div class="cont-tk">
                <img src="@/assets/tk.png" alt="" class="tk">
                <div class="btn-group">
                    <img src="@/assets/btn_cancel.png" alt="" class="cancle">
                    <img src="@/assets/btn_used.png" alt="" class="uesd">
                </div>
            </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      show: false
    };
  }
};
</script>
<style lang="less" scoped>
.container {
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  padding-top: 15vw;
  .bg {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
  }
  .scroll-info {
    height: 150vw;
    overflow-y: scroll;
  }
  .info {
    // border:1px solid ;
    width: 84%;
    margin: 0 auto 2%;
    position: relative;
    border-bottom: 1px solid #fff;
    padding: 15px 0;
  }
  .time {
    margin-bottom: 2%;
    color: #fff;
    font-size: 12px;
  }
  .rule {
    margin: 5px 0;
    div {
      padding-top: 5px;
      color: #fff;
      font-size: 12px;
    }
  }
  .bg_ticket {
    .use-bg {
      width: 100%;
      position: relative;
    }
    .cont {
      width: 100%;
      display: flex;
      justify-content: space-between;
      // border: 1px solid #ccc;
      align-items: center;
      position: absolute;
      top: 9vw;
      .rank {
        color: #000;
        font-weight: bold;
        font-size: 17px;
        padding-left: 10px;
      }
      .name {
        font-weight: bold;
        color: #e96d29;
        font-size: 14px;
      }
      .id {
        margin-top: 5px;
        font-size: 12px;
        color: #666666;
      }
    }
    .btn {
      // border: 1px solid;
      width: 65px;
      height: 100px;
    }
  }
  .cont-bg {
    position: absolute;
    left: 0;
    top: 70px;
    padding: 0 10px;
  }
  .fix{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,.7);
        z-index: 99;
        .cont-tk{
            position: absolute;
            width: 80%;
            transform: translate(-50%,-50%);
            top:50%;
            left: 50%;
            img{
                width: 100%;
            }
            .btn-group{
                width: 100%;
                padding: 10%;
                box-sizing: border-box;
                display: flex;
                justify-content: space-between;
                img{
                    width:40%;
                    height: 100%;
                }
                .uesd{
                    // padding-left: 5%;
                }
            }
        }
  }
}
</style>